<? $sess = new Zend_Session_Namespace(CLU_NS);?>
<!-- 
<link rel="stylesheet" href="/public/library/tooltip/css/jquery.css">
<script src="/public/library/tooltip/js/jquery_003.js" type="text/javascript"></script>
<script src="/public/library/tooltip/js/jquery.js" type="text/javascript"></script>
<script src="/public/library/tooltip/js/jquery_002.js" type="text/javascript"></script>-->
<script src="/public/library/jquery/jquery-tooltip/jquery.tooltip.js" type="text/javascript"></script>


<div class="blog_friend">
	<div class="blog_friend_bar"><?=t(183)?></div>
	<? $countFriend = count($this->viewParams['friend']);?>
	<?if($countFriend):?>
		<div> 
			<table border="0" cellpadding="0" cellspacing="0" height="23" width="219">
		  		<tbody><tr>
				    <td width="103"><?=$countFriend?> <?=t(185)?><?if($sess->viewLang == 'en') echo 's';?></td>
				    <td width="108" align="right"><a href="#"><?=t(151)?> &nbsp;&nbsp;&nbsp;</a></td>
		  		</tr></tbody>
			</table>
		 </div>	
		 <div class="dynatip">&nbsp;</div>
		<div class="blog_friend_content" id="dyna">
			<?$avatar = APP_PATH."/public/ufiles/%d/images/%s/avatar/avatar.jpg";?>
			<?for($i=0;$i<min(9,$countFriend);$i++){?>
			<div class="blog_friend_img">
			<?
			if(isset($this->viewParams['friend'][$i]['uid2']) && file_exists(sprintf($avatar, $this->viewParams['friend'][$i]['uid2'] , "medium"))){
				$temp = sprintf($avatar, $this->viewParams['friend'][$i]['uid2'] , "medium");
			}elseif(isset($this->viewParams['friend'][$i]['uid2']) &&  file_exists(sprintf($avatar, $this->viewParams['friend'][$i]['uid2'] , "small"))){
				$temp = sprintf($avatar, $this->viewParams['friend'][$i]['uid2'] , "small");
			}else $temp = sprintf($avatar, 0 , "small");
			?>
			<!-- 
			<a title = "<?=$this->viewParams['friend'][$i]['uid2_name']?>" href="<?=$this->hvnUrl(array('action' => 'view'), 'account')?>?id=<?=$this->viewParams['friend'][$i]['uid2']?>">
				<?if(isset($temp)):?>
					<img id="tonus<?=$i?>" src="<?=$temp;?>" align="absmiddle">
					<script type="text/javascript">
					$(function() {
					$('#tonus<?=$i?>').tooltip({
						delay: 0,
						showURL: false,
						bodyHandler: function() {
							return $("<img/>").attr("src", this.src);
						}
					});
					});
					</script>
				<?else:?>
					<img  src="<?=sprintf($avatar, 0, "small");?>" align="absmiddle" >
				<?endif?>
			</a>
			
			 -->
			<div class="clear"></div>
			<a title = "<?=$this->viewParams['friend'][$i]['uid2_name']?>" href="<?=$this->hvnUrl(array('action' => 'view'), 'account')?>?id=<?=$this->viewParams['friend'][$i]['uid2']?>">
				<?=substr($this->viewParams['friend'][$i]['uid2_name'],0 ,6);?>
				<?if(strlen($this->viewParams['friend'][$i]['uid2_name'])>6)
					echo '..';
				?>
			</a>
			</div> 
			<?}?>
		</div>
		
		
	<?else:?>
		<div>
			<table border="0" cellpadding="0" cellspacing="0" height="23" width="219">
				<tbody><tr>
					<td width="103">0 <?=t(185)?></td>		
					<td width="108" align="right"><a href="#"><?=t(151)?>&nbsp;&nbsp; &nbsp;</a></td>
				</tr></tbody>
			</table>	
		</div>
		<br/><br/><br/>
			
	<?endif?>
</div>